package com.bytezreo.template;


public class SalariedEmployee extends Employee{
	
	private double monthlySalary;  //月工资

	public SalariedEmployee(String name, int number, MyDate birthady) {
		super(name, number, birthady);
		
	}
	
	public SalariedEmployee(String name, int number, MyDate birthady,double monthlySalary) {
		super(name, number, birthady);
		this.monthlySalary = monthlySalary;
	}

	
	public double getMonthlySalary() {
		return monthlySalary;
	}


	public void setMonthlySalary(double monthlySalary) {
		this.monthlySalary = monthlySalary;
	}


	@Override
	public double earnings() {
		
		return monthlySalary;
	}

	public String toString() {
		return "SalariedEmployee[ " +super.toString()+"]";
	}



	
	
}
